﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Weather.Wap
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
               name: "WapIndex",
               url: "{controller}/{action}/{stationNum}",
               defaults: new { controller = "Wap", action = "Index", stationNum = UrlParameter.Optional }
               );

            routes.MapRoute(
              name: "WapWeather",
              url: "{controller}/{action}/{stationNum}/{fcstType}",
              defaults: new { controller = "Wap", action = "Index", stationNum = UrlParameter.Optional, fcstType = UrlParameter.Optional }
              );

        }
    }
}